//
//  GoodsStatesTableViewCell.m
//  StandardizedProduct
//
//  Created by 宁宁 on 16/6/22.
//  Copyright © 2016年 ym. All rights reserved.
//

#import "GoodsStatesTableViewCell.h"

#import "GoodsStatesCollectionViewCell.h"

#define GoodsStatesCellHeight 80

@implementation GoodsStatesTableViewCell

 static NSString *const GoodsStatesCollectionViewCellID = @"GoodsStatesCollectionViewCell";

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
        layout.minimumLineSpacing = 0;
        layout.minimumInteritemSpacing = 0;
        _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, GoodsStatesCellHeight) collectionViewLayout:layout];
        _collectionView.scrollEnabled = NO;
        _collectionView.backgroundColor = [UIColor clearColor];
        [self.contentView addSubview:_collectionView];
        
        //注册自定义cell
        [_collectionView registerNib:[UINib nibWithNibName:@"GoodsStatesCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:GoodsStatesCollectionViewCellID];
    }
    return self;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
